//
//  MJCustomGifHeader.swift
//  Pods
//
//  Created by eme on 2017/5/16.
//
//

import MJRefresh
import UIKit

public class MJCustomGifHeader: MJRefreshGifHeader {
    
    public override func prepare() -> Void {
        self.lastUpdatedTimeLabel.isHidden = true
        self.stateLabel.isHidden = true
        super.prepare()
        var idleImages:[UIImage] = []
        for i  in 0 ... 7 {
            if let image = UIImage(named: "dropdown_anim__000\(i)", in: BrandonCore.bundle, compatibleWith: nil) {
                idleImages.append(image)
            }
        }
        self.setImages(idleImages, for: .idle)
        var refreshingImages:[UIImage] = []
        for i  in 0 ... 5 {
            if let image = UIImage(named: "dropdown_loading_0\(i)", in: BrandonCore.bundle, compatibleWith: nil) {
                refreshingImages.append(image)
            }
        }
        self.setImages(refreshingImages, for: .refreshing)
        self.setImages(refreshingImages, for: .pulling)
    }
    
}
